import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        String s = in.nextLine();
        int count =0;
         int max = 0;
         int index = 0;
         for(int i = 0;i<s.length();i++){
            if(s.charAt(i)>='0'&&s.charAt(i)<='9'){
                count++;
            }
            if(count!=0&&(s.charAt(i)<'0'||s.charAt(i)>'9')){
                if(count>max){
                    max = count;
                    index = i-1;
                }
                count = 0;
            }
            if(i==s.length()-1&&count!=0){
                if(count>max){
                    max = count;
                    index = i;
                }
            }
         }
         for(int j = index-max+1 ;j<=index;j++){
            System.out.print(s.charAt(j));
         }
    }
}